package org.student.impl;

import java.util.List;

import org.springframework.stereotype.Component;
import org.student.dao.IUserInfoDao;
import org.student.entity.PageInfo;
import org.student.entity.SysUser;
@SuppressWarnings("all")
@Component("UserInfoImpl")
public class IUserInfoDaoImpl extends HibernateDaoImpl implements IUserInfoDao{

	@Override
	public boolean checkUser(String userName, String password) throws Exception {
		String hql = "SELECT COUNT(*) FROM SysUser WHERE userName = ? AND password = ?" ;
		List<SysUser> userList = super.getHibernateTemplate().find(hql, new String[]{userName,password}) ;
		return false;
	}

	@Override
	public List<SysUser> getAllUser(PageInfo pageInfo) throws Exception {
		//return super.getHibernateTemplate().find("FROM SysUser") ;
		List<SysUser> userList = super.findPageByQuery("FROM SysUser", null, pageInfo) ;
		return userList ;
	}

}
